/**
*      author: Y_Yao
*      created: 2024-10-22 16:27:09
**/

#include<bits/stdc++.h>

using namespace std;
using LL = long long;
const LL LLINF = 1e18;
const int INF = 0x3f3f3f3f;
const int N = 2000 + 7;
int a[N],b[N],dp[N];
int n,c1,c2,c3;

bool check(int i)//判断i位置能不能选
{

}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    cin >> n;
    cin >> c1 >> c2 >> c3;
    for(int i = 1;i <= n;i ++)
    {
        cin >> a[i] >> b[i];
    }

    for(int i = 1;i <= n;i++)
    {
        dp[i] = dp[i-1];
        if(check(i))
        {
            dp[i] = dp[i - 1] + 1;
        }
    }

    cout << dp[n] << endl;
    return 0;
}